package com.blb.springboot.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blb.springboot.entity.User;
import com.blb.springboot.mapper.UserMapper;
import com.blb.springboot.service.UserService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author lvtian
 * @date 2023/1/10 16:31
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    //穿入账号密码验证
    public User login(String username, String password) {
        User user = userMapper.login(username, password);
        if (user == null) {
            return user;
        }
        return null;
    }
}
